<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Classical N, P, K Factorial Experiment</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="R.css" />
</head><body>

<table width="100%" summary="page for npk"><tr><td>npk</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2>
Classical N, P, K Factorial Experiment
</h2>

<h3>Description</h3>

<p>A classical N, P, K (nitrogen, phosphate, potassium) factorial
experiment on the growth of peas conducted on 6 blocks. Each half of a
fractional factorial design confounding the NPK interaction was used
on 3 of the plots.
</p>


<h3>Usage</h3>

<pre>
npk
</pre>


<h3>Format</h3>

<p>The <code>npk</code> data frame has 24 rows and 5 columns:
</p>

<dl>
<dt><code>block</code></dt><dd>
<p>which block (label 1 to 6).
</p>
</dd>
<dt><code>N</code></dt><dd>
<p>indicator (0/1) for the application of nitrogen.
</p>
</dd>
<dt><code>P</code></dt><dd>
<p>indicator (0/1) for the application of phosphate.
</p>
</dd>
<dt><code>K</code></dt><dd>
<p>indicator (0/1) for the application of potassium.
</p>
</dd>
<dt><code>yield</code></dt><dd>
<p>Yield of peas, in pounds/plot (the plots were (1/70) acre).
</p>
</dd>
</dl>



<h3>Note</h3>

<p>This dataset is also contained in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.0.2 and later.
</p>


<h3>Source</h3>

<p>Imperial College, London, M.Sc. exercise sheet.
</p>


<h3>References</h3>

<p>Venables, W. N. and Ripley, B. D. (2002)
<em>Modern Applied Statistics with S.</em> Fourth edition.  Springer.
</p>


<h3>Examples</h3>

<pre>
options(contrasts = c("contr.sum", "contr.poly"))
npk.aov &lt;- aov(yield ~ block + N*P*K, npk)
npk.aov
summary(npk.aov)
alias(npk.aov)
coef(npk.aov)
options(contrasts = c("contr.treatment", "contr.poly"))
npk.aov1 &lt;- aov(yield ~ block + N + K, data = npk)
summary.lm(npk.aov1)
se.contrast(npk.aov1, list(N=="0", N=="1"), data = npk)
model.tables(npk.aov1, type = "means", se = TRUE)
</pre>


</body></html>
